import 'package:flutter_book_store/login/change_pwd.dart';
import 'package:flutter_book_store/login/register.dart';
import 'package:flutter_book_store/login/setting.dart';
import 'package:flutter_book_store/user/user_info.dart';
import 'package:get/get.dart';

import '../book/book_detail.dart';
import '../homepage.dart';
import '../login/login.dart';

// ignore: avoid_classes_with_only_static_members
class AppPages {
  static const INITIAL = Routes.HOME;

  static final routes = [
    GetPage(name: Routes.HOME, page: () => HomePageWidget(),
        // binding: HomeBinding(),
        children: [
          GetPage(name: Routes.LOGIN, page: () => LoginWidget()),
          GetPage(
            name: Routes.BOOKDETAIL,
            page: () => BookDetailPage(),
          ),
          GetPage(
            name: Routes.REGISTER,
            page: () => RegisterPage(),
          ),
          GetPage(
            name: Routes.SETTING,
            page: () => SettingPage(),
          ),GetPage(
            name: Routes.CHANGE_PWD,
            page: () => ChangePwdPage(),
          ),
          GetPage(
            name: Routes.USERINFO,
            page: () => UserInfoPage(),
          ),
        ]),
  ];
}

abstract class Routes {
  static const HOME = '/';
  static const LOGIN = '/login/login';
  static const BOOKDETAIL = '/book/book_detail';
  static const REGISTER = '/login/register';
  static const USERINFO = '/user/user_info';
  static const SETTING = '/login/setting';
  static const CHANGE_PWD = '/login/change_pwd';
}
